package com.ruoyi.web.controller.system.ledger;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ledger.domain.LedgerConfig;
import com.ruoyi.ledger.service.ILedgerConfigService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 婚礼账本配置主题前端控制层
 * @author: zyh
 * @date: 2025/3/5 17:06
 **/
@RestController
@RequestMapping("api/v1.0/ledger-config")
public class LedgerConfigController extends BaseController {


    @Resource
    private  ILedgerConfigService  ledgerConfigService;


    @GetMapping("list-ledger-config")
    public AjaxResult listLedgerConfig(@RequestParam(required = true) String userId){
        List<LedgerConfig> ledgerConfigList = ledgerConfigService.getLedgerConfigList(userId);
        return AjaxResult.success(ledgerConfigList);
    }
}
